﻿using Face8280WebSocketServer.Utility.VerifyAttribute;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Face8280WebSocketServer.DTO.FacePeople
{
    /// <summary>
    /// 查询设备的参数
    /// </summary>
    public class PeopleQueryParameter : BasePageParameter
    {
        /// <summary>
        /// 人员编号（数字<20位）
        /// </summary>
        [VerifyLong(iMax: UInt32.MaxValue, iMin: 0,
                errCode: 1, sErrorDesc: "人员编号超出范围(1-4294967295)")]
        public long Code { get; set; } //是

        /// <summary>
        /// 人员姓名（字符<30位）
        /// </summary>
        [VerifyText(iMax: 30, iMin: 1, required: false,
            errCode: 2, sErrorDesc: "人员姓名由1-30个字符组成")]
        public string Name { get; set; } //是

        /// <summary>
        /// 职务
        /// </summary>
        [VerifyText(iMax: 30, iMin: 0, required: false,
            errCode: 3, sErrorDesc: "职务长度不能超过30个字")]
        public string Job { get; set; } //否

        /// <summary>
        /// 有无照片
        /// </summary>
        [VerifyNumRange(iRange: new int[] { 0, 1, 2 },
            errCode: 5, sErrorDesc: "有无照片: 0--不做条件查询；1--有照片；2--无照片")]
        public int Photo { get; set; }

        /// <summary>
        /// IC卡号 纯数字
        /// </summary>
        [VerifyLong(iMax: UInt32.MaxValue, iMin: 0,
                errCode: 6, sErrorDesc: "IC卡号超出范围(1-4294967295)")]
        public long Card { get; set; } //否

        /// <summary>
        /// 联系方式
        /// </summary>
        [VerifyText(iMax: 30, iMin: 0, required: false,
            errCode: 7, sErrorDesc: "联系方式长度不能超过30个字")]
        public string Phone { get; set; } //否

    }
}
